import { Application } from 'egg'

export default (app: Application) => {
  const { controller, router } = app
  router.prefix('/api')
  router.get('/getSessionCsrfToken', controller.home.getSessionCsrfToken)
  router.get('/getUserInfo', controller.home.getUserInfo)
  router.post('/login', controller.home.login)
  router.get('/getUserList', controller.home.getUsers)
  router.post('/addUser', controller.home.addUser)
  router.post('/updata', controller.home.updataUserInfo)
  router.post('/delUser', controller.home.delUser)
  router.post('/bulkCreate', controller.home.bulkCreate)
  router.post('/getUserPage', controller.home.getUserPage)
  router.post('/getOrderList', controller.home.getOrderList)
}
